﻿using System.IO;
using System.Linq;
using System.Web.Mvc;
using DotNetDream.Extenstion;
using DotNetDream.Helper;

namespace DotNetDream.Controllers
{
    public class HomeController : DndController
    {
        public ActionResult Index()
        {
            #region Font script
            //TODO: Font script generator
            string test = string.Empty;
            DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/Content/Images/Emoticons"));
            var files = dir.GetFiles().OrderBy(f => f.Name).ToList();
            foreach (FileInfo file in files)
            {
                test += string.Format("'{0}',", file.Name);
            }
            //ViewBag.Test = test;
            #endregion

            ViewBag.Message = "Welcome to ASP.NET MVC!";
            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
